<?php $this->load->view('admin/_begin') ?>
<script type="text/javascript">
  $(document).ready(function(){
    $('#shortcuts').hide();
  });
</script>
<?php $this->load->view('admin/' . $this->router->fetch_class() . '/_filter') ?>
<form accept-charset="utf-8" method="post" action="<?php echo site_url('admin/'.$this->router->fetch_class() . '/action') ?>">	
  <div id="filter-stage" style="display: block;">	
    <table border="0" class="table-list">
      <thead>
        <tr>
          <th><?php echo $this->lang->line("label.payment_history.provider_id") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.end_user_id") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.transaction_id") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.date_pay") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.amount") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.currency") ?></th>
          <th><?php echo $this->lang->line("label.payment_history.description") ?></th>
        </tr>
      </thead>
      <tbody>
        <?php 
        if(empty($objects)){ ?>
        <tr>
          <td colspan="8">
            <div class="no_data"><?php echo $this->lang->line('label.empty.data', 
                    $this->lang->line('label.'.$this->router->fetch_class().'s'))?></div>
          </td>
        </tr>
        <?php } foreach ($objects as $obj) { ?>
          <tr>
            <td>
              <?php $ref_obj = $this->provider_model->get($obj["provider_id"]);
              if ($ref_obj) { ?>
                <a href="<?php echo site_url('admin/'."provider/show/" . $obj["provider_id"]) ?>">
                  <?php echo $this->provider_model->to_string($ref_obj) ?></a>
              <?php } ?>
            </td>
            <td>
              <?php
              $ref_obj = $this->end_user_model->get($obj["end_user_id"]);
              if ($ref_obj) {
                ?>
                <a href="<?php echo site_url('admin/'."end_user/show/" . $obj["end_user_id"]) ?>">
                  <?php echo $this->end_user_model->to_string($ref_obj) ?></a>
              <?php } ?>
            </td>
            <td>
              <?php
              $ref_obj = $this->transaction_model->get($obj["transaction_id"]);
              if ($ref_obj) {
                ?>
                <a href="<?php echo site_url('admin/'."transaction/show/" . $obj["transaction_id"]) ?>">
                  <?php echo $this->transaction_model->to_string($ref_obj) ?></a>
              <?php } ?>
            </td><td>
              <?php echo empty($obj["date_pay"]) ? '' : date($this->setting_model->item('date_format'), $obj["date_pay"]) ?>
            </td><td>
              <?php echo $obj["amount"] ?>
            </td>
            <td>
              <?php
              $ref_obj = $this->end_user_model->get($obj["currency_id"]);
              if ($ref_obj) {
                ?>
                <a href="<?php echo site_url('admin/'."currency/show/" . $obj["currency_id"]) ?>">
                  <?php echo $this->currency_model->to_string($ref_obj) ?></a>
              <?php } ?>
            </td>
            <td>
              <?php echo $obj["description"] ?>
            </td>
          </tr>
        <?php } ?>
      </tbody>
    </table><div class="paging"><?php echo $paging ?></div>
  </div>
</form>
<?php $this->load->view('admin/_end') ?>